package com.foreknow.demo4;

import javax.sound.midi.Soundbank;
import java.lang.reflect.Array;
import java.util.Scanner;

public class WeektTest {
    public static void main(String[] args) {
        Scanner input  = new Scanner(System.in);
        System.out.println("请输入任意整数");
        int number1 = input.nextInt();
        int number2 = input.nextInt();
        int number3 = input.nextInt();
        int number4;
        if (number1 > number2) {
            number4 = number1;
            number1 = number2;
            number2 =number4;
        }
        if (number1 > number3) {
            number4 = number3;
            number3 = number1;
            number1 = number4;
        }
        if (number2 > number3) {
            number4 = number2;
            number2 = number3;
            number3 = number4;
        }

        System.out.printf("%d,%d,%d\n",number1,number2,number3);



        System.out.println("请输入分数");
        int score = input.nextInt();
        if (score >= 90) {
            System.out.println("等级A");
        }else if (score >= 70 && score <=90){
            System.out.println("等级B");
        }else if (score >= 60 && score <=70){
            System.out.println("等级C");
        }else if (score < 60) {
            System.out.println("等级D");
        }


        int isSet;
        int positiveNum = 0;
        int negativeNum = 0;
        System.out.println("请输入任意整数或者负数");
        do {
            isSet = input.nextInt();
            if (isSet > 0) {
                positiveNum++;
            }else if (isSet < 0){
                negativeNum++;
            }
        }while (isSet != 0);
        System.out.println("正数个数为" + positiveNum + "个 " +"负数个数为" + negativeNum + "个" );

    }
}
